CIE: Use a faster cbrtf implementation
authorDebarshi Ray <debarshir@gnome.org>
Thu, 21 Dec 2017 09:14:53 +0000 (10:14 +0100)
committerDebarshi Ray <debarshir@gnome.org>
Thu, 21 Dec 2017 10:03:58 +0000 (11:03 +0100)
commitc28478383c1a628d42866803d785e1f23baa33be
treea439e33bce8d159e6295b434206616a3aa697f4a
parent6da8f5e755f02ca3c3fb2c625da78612cff7775d
CIE: Use a faster cbrtf implementation

This is the approximate cube root of an IEEE float implementation from
Hacker's Delight. The elimination of all conditional branches probably
makes it a better candidate for future SIMD accelerated code paths.

On an Intel i7 Haswell, it now takes 0.27s to convert a 15 megapixel
buffer from "RGBA float" to "CIE Lab alpha float" instead of the
earlier 0.35s. A "Y float" to "CIE L float" conversion takes 0.085s
instead of 0.102s.

Original code: http://www.hackersdelight.org/hdcodetxt/acbrt.c.txt
Permissions: http://www.hackersdelight.org/permissions.htm

https://bugzilla.gnome.org/show_bug.cgi?id=791837
extensions/CIE.c